package com.wxmblog.photo.controller.admin;

//import org.apache.shiro.authz.annotation.RequiresPermissions;

import com.wxmblog.base.common.constant.ParamTypeConstants;
import com.wxmblog.base.common.utils.PageResult;
import com.wxmblog.base.common.web.domain.R;
import com.wxmblog.photo.common.rest.response.user.ContactInfoResponse;
import com.wxmblog.photo.service.ContactInfoService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 联系信息
 *
 * @author wanglei
 * @email 378526425@qq.com
 * @date 2023-06-28 17:22:40
 */
@RestController
@RequestMapping("photo/admin/contactinfo")
@Api(tags = "后台-联系方式")
public class ContactInfoAdminController {

    @Autowired
    private ContactInfoService contactInfoService;


    @ApiImplicitParams({
            @ApiImplicitParam(paramType = ParamTypeConstants.requestParam, name = "pageIndex", value = "页码", defaultValue = "1"),
            @ApiImplicitParam(paramType = ParamTypeConstants.requestParam, name = "pageSize", value = "数量", defaultValue = "10")
    })
    @ApiOperation("联系方式列表")
    @ApiOperationSort(value = 1)
    @GetMapping("/page")
    public R<PageResult<ContactInfoResponse>> viewRecord(
            @RequestParam(value = "pageIndex", required = false, defaultValue = "1") Integer pageIndex,
            @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
        return R.ok(contactInfoService.page(pageIndex, pageSize));
    }
}
